import Vue from 'vue'
import App from './App.vue'
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
import VueRouter from 'vue-router';
import Vuex from 'vuex';

Vue.use(VueRouter);
Vue.use(ViewUI);
Vue.use(Vuex);

const RouterConfig = [
    {
        path: '/index',
        name: 'index',
        component: () => import('./components/hello/index.vue')
    },
    {
        path: '/custom',
        name: 'custom',
        component: () => import('./components/customUse/index.vue')
    }, {
        path: '/axios',
        name: 'axios',
        component: () => import('./components/helloAxios/index.vue')
    },
    {
        path: '/layout',
        name: 'layout',
        component: () => import('./components/layout/index.vue')
    },
   {
        path: '/dynamic',
        name: 'dynamic',
        component: () => import('./components/dynamicForm/index.vue')
    },
];

const router = new VueRouter({
    routes: RouterConfig
});

new Vue({
    router,
    render: h => h(App),
}).$mount('#app')
